const createjs = require("createjs-ts").default;

console.log(createjs)
const init = () => {
    const canvasDom = document.getElementById("stage");
    const stage = new createjs.Stage(canvasDom);
    createjs.Ticker.framerate = 60;
    createjs.Ticker.addEventListener("tick", stage);
    const bitmap=new createjs.Bitmap("https://www.createjs.cc/0rDPEs5f.jpg");
    stage.addChild(bitmap);
    //stage.update();
    const text = new createjs.Text("欢迎使用CreateJS", "20px Arial");
    text.setTransform(10, 455);
    stage.addChild(text);
}
document.addEventListener("DOMContentLoaded", init);
//window.init=init